{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0.4578711  0.24165401 0.23346205 0.13694343 0.1646426  0.27184538\n",
      " 0.21012976 0.20883566 0.38517292 0.70259393 0.4245989  0.19677452\n",
      " 0.23293797 0.13477148 0.38322968 0.25453923 0.23632669 0.19204436\n",
      " 0.59515969 0.14329158 0.07877611 0.14179445 0.22261103 0.09507138\n",
      " 0.11044554 0.03663171 0.2127624  0.09448444 0.06749986 0.08220274\n",
      " 0.12544406]\n"
     ]
    }
   ],
   "source": [
    "#!/usr/bin/python3\n",
    "# -*- coding: utf-8 -*-\n",
    "# @Time    : 2021-06-06 19:45\n",
    "# @Author  : zym\n",
    "# @FileName: data_visualization.py\n",
    "# @Software: PyCharm\n",
    "# @Description: 实验一  多维数据分析基础\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "\n",
    "\n",
    "# 正向化矩阵标准化\n",
    "def l2_normalize(v):\n",
    "    l2 = np.linalg.norm(v, ord=2, axis=0, keepdims=True)\n",
    "    return v / l2\n",
    "\n",
    "\n",
    "# 找每个指标的最大值\n",
    "def find_max(v):\n",
    "    return np.amax(v, axis=0)\n",
    "\n",
    "\n",
    "# 找每个指标的最小值\n",
    "def find_min(v):\n",
    "    return np.amin(v, axis=0)\n",
    "\n",
    "\n",
    "# 计算每个样本对象与最大值的距离\n",
    "def cal_d_max(z, z_max):\n",
    "    return (np.sum((z - z_max)**2, axis=1))**0.5\n",
    "\n",
    "\n",
    "# 计算每个样本对象与最小值的距离\n",
    "def cal_d_min(z, z_min):\n",
    "    return (np.sum((z - z_min)**2, axis=1))**0.5\n",
    "\n",
    "\n",
    "# 计算每个评价对象的得分\n",
    "def cal_score(d_max, d_min):\n",
    "    return d_min / (d_max + d_min)\n",
    "\n",
    "\n",
    "# 将二维数组格式object转换为float64\n",
    "def o2f(x_object):\n",
    "    X1 = np.random.rand(x_object.shape[0], x_object.shape[1])  # 创建与x_object同样维度的二维数组\n",
    "    for i in range(x_object.shape[0]):\n",
    "        for j in range(x_object.shape[1]):\n",
    "            if isinstance(x_object[i, j], str):\n",
    "                X1[i, j] = float(x_object[i, j].replace(' ', ''))\n",
    "            else:\n",
    "                X1[i, j] = x_object[i, j]\n",
    "    return X1\n",
    "\n",
    "\n",
    "if __name__ == '__main__':\n",
    "    data = pd.read_csv('data.csv')\n",
    "    X = np.array(data)\n",
    "    X = X[:, 1:]  # 去掉地区的列\n",
    "    X_float = o2f(X)  # 元素类型为np.float64的数组\n",
    "    Z = l2_normalize(X_float)  # 标准化指标\n",
    "    z_max = find_max(Z)\n",
    "    z_min = find_min(Z)\n",
    "    d_max = cal_d_max(Z, z_max)\n",
    "    d_min = cal_d_min(Z, z_min)\n",
    "    score = cal_score(d_max, d_min)\n",
    "    print(score)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "data['score'] = score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>地区</th>\n",
       "      <th>大专以上学历人数(万人)</th>\n",
       "      <th>万人大专以上学历人数(人/万人)</th>\n",
       "      <th>高等学校在校学生数（万人）</th>\n",
       "      <th>十万人高等学校在校学生数（人/十万 人）</th>\n",
       "      <th>科技企业孵化器管理机构从业人员数(人)</th>\n",
       "      <th>国家级孵化器管理机构从业人员数(人)</th>\n",
       "      <th>国家大学科技园管理机构从业人员数(人)</th>\n",
       "      <th>火炬计划特色产业基地企业从业人员数(人)</th>\n",
       "      <th>国家级示范生产力促进中心人员数(人)</th>\n",
       "      <th>...</th>\n",
       "      <th>信息传输、软件和信息技术服务业固定资产投资占比重( %)</th>\n",
       "      <th>固定电话和移动电话用户数（万户）</th>\n",
       "      <th>百人固定电话和移动电话用户数(户/百人)</th>\n",
       "      <th>国际互联网上网人数(万人)</th>\n",
       "      <th>万人国际互联网上网人数(人/万人)</th>\n",
       "      <th>有效商标注册数(万件)</th>\n",
       "      <th>百万人有效商标注册数(件/百万人)</th>\n",
       "      <th>地区生产总值(亿元)</th>\n",
       "      <th>人均地区生产总值(元)</th>\n",
       "      <th>score</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>北京</td>\n",
       "      <td>781.02</td>\n",
       "      <td>3815.07</td>\n",
       "      <td>116.81</td>\n",
       "      <td>5428. 83</td>\n",
       "      <td>2586</td>\n",
       "      <td>934</td>\n",
       "      <td>509</td>\n",
       "      <td>33642</td>\n",
       "      <td>736</td>\n",
       "      <td>...</td>\n",
       "      <td>2. 57</td>\n",
       "      <td>4907. 68</td>\n",
       "      <td>228. 09</td>\n",
       "      <td>1593</td>\n",
       "      <td>7403. 79</td>\n",
       "      <td>54. 57</td>\n",
       "      <td>25363. 13</td>\n",
       "      <td>21330. 83</td>\n",
       "      <td>99995</td>\n",
       "      <td>0.457871</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>天津</td>\n",
       "      <td>331.75</td>\n",
       "      <td>2284. 88</td>\n",
       "      <td>64. 96</td>\n",
       "      <td>4282. 65</td>\n",
       "      <td>1663</td>\n",
       "      <td>454</td>\n",
       "      <td>9</td>\n",
       "      <td>82134</td>\n",
       "      <td>192</td>\n",
       "      <td>...</td>\n",
       "      <td>1.2</td>\n",
       "      <td>1712.41</td>\n",
       "      <td>112. 90</td>\n",
       "      <td>904</td>\n",
       "      <td>5959. 88</td>\n",
       "      <td>9. 11</td>\n",
       "      <td>6008. 20</td>\n",
       "      <td>15726. 93</td>\n",
       "      <td>105231</td>\n",
       "      <td>0.241654</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>河北</td>\n",
       "      <td>541</td>\n",
       "      <td>794. 23</td>\n",
       "      <td>154. 93</td>\n",
       "      <td>2098. 22</td>\n",
       "      <td>871</td>\n",
       "      <td>319</td>\n",
       "      <td>92</td>\n",
       "      <td>279484</td>\n",
       "      <td>688</td>\n",
       "      <td>...</td>\n",
       "      <td>0. 50</td>\n",
       "      <td>7314. 17</td>\n",
       "      <td>99. 06</td>\n",
       "      <td>3603</td>\n",
       "      <td>4879. 63</td>\n",
       "      <td>19. 19</td>\n",
       "      <td>2599. 34</td>\n",
       "      <td>29421.15</td>\n",
       "      <td>39984</td>\n",
       "      <td>0.233462</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>山西</td>\n",
       "      <td>340. 51</td>\n",
       "      <td>984. 73</td>\n",
       "      <td>91.89</td>\n",
       "      <td>2518.81</td>\n",
       "      <td>249</td>\n",
       "      <td>152</td>\n",
       "      <td>22</td>\n",
       "      <td>49397</td>\n",
       "      <td>442</td>\n",
       "      <td>...</td>\n",
       "      <td>0. 47</td>\n",
       "      <td>3886. 56</td>\n",
       "      <td>106. 54</td>\n",
       "      <td>1838</td>\n",
       "      <td>5038. 43</td>\n",
       "      <td>6. 13</td>\n",
       "      <td>1679. 54</td>\n",
       "      <td>12761.49</td>\n",
       "      <td>35070</td>\n",
       "      <td>0.136943</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>内蒙古</td>\n",
       "      <td>258. 64</td>\n",
       "      <td>1089. 36</td>\n",
       "      <td>54. 00</td>\n",
       "      <td>2155. 70</td>\n",
       "      <td>271</td>\n",
       "      <td>140</td>\n",
       "      <td>8</td>\n",
       "      <td>13256</td>\n",
       "      <td>191</td>\n",
       "      <td>...</td>\n",
       "      <td>1.4</td>\n",
       "      <td>2993. 69</td>\n",
       "      <td>119. 52</td>\n",
       "      <td>1142</td>\n",
       "      <td>4559. 23</td>\n",
       "      <td>6.47</td>\n",
       "      <td>2583. 11</td>\n",
       "      <td>17770. 19</td>\n",
       "      <td>71046</td>\n",
       "      <td>0.164643</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 25 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    地区 大专以上学历人数(万人) 万人大专以上学历人数(人/万人) 高等学校在校学生数（万人） 十万人高等学校在校学生数（人/十万 人）  \\\n",
       "0   北京       781.02          3815.07        116.81             5428. 83   \n",
       "1   天津       331.75         2284. 88        64. 96             4282. 65   \n",
       "2   河北          541          794. 23       154. 93             2098. 22   \n",
       "3   山西      340. 51          984. 73         91.89              2518.81   \n",
       "4  内蒙古      258. 64         1089. 36        54. 00             2155. 70   \n",
       "\n",
       "   科技企业孵化器管理机构从业人员数(人)  国家级孵化器管理机构从业人员数(人)  国家大学科技园管理机构从业人员数(人)  \\\n",
       "0                 2586                 934                  509   \n",
       "1                 1663                 454                    9   \n",
       "2                  871                 319                   92   \n",
       "3                  249                 152                   22   \n",
       "4                  271                 140                    8   \n",
       "\n",
       "   火炬计划特色产业基地企业从业人员数(人)  国家级示范生产力促进中心人员数(人)  ...  \\\n",
       "0                 33642                 736  ...   \n",
       "1                 82134                 192  ...   \n",
       "2                279484                 688  ...   \n",
       "3                 49397                 442  ...   \n",
       "4                 13256                 191  ...   \n",
       "\n",
       "   信息传输、软件和信息技术服务业固定资产投资占比重( %)  固定电话和移动电话用户数（万户） 百人固定电话和移动电话用户数(户/百人)  \\\n",
       "0                         2. 57          4907. 68              228. 09   \n",
       "1                           1.2           1712.41              112. 90   \n",
       "2                         0. 50          7314. 17               99. 06   \n",
       "3                         0. 47          3886. 56              106. 54   \n",
       "4                           1.4          2993. 69              119. 52   \n",
       "\n",
       "  国际互联网上网人数(万人) 万人国际互联网上网人数(人/万人) 有效商标注册数(万件) 百万人有效商标注册数(件/百万人) 地区生产总值(亿元)  \\\n",
       "0          1593          7403. 79      54. 57         25363. 13  21330. 83   \n",
       "1           904          5959. 88       9. 11          6008. 20  15726. 93   \n",
       "2          3603          4879. 63      19. 19          2599. 34   29421.15   \n",
       "3          1838          5038. 43       6. 13          1679. 54   12761.49   \n",
       "4          1142          4559. 23        6.47          2583. 11  17770. 19   \n",
       "\n",
       "   人均地区生产总值(元)     score  \n",
       "0        99995  0.457871  \n",
       "1       105231  0.241654  \n",
       "2        39984  0.233462  \n",
       "3        35070  0.136943  \n",
       "4        71046  0.164643  \n",
       "\n",
       "[5 rows x 25 columns]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "area = data['地区']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['北京',\n",
       " '天津',\n",
       " '河北',\n",
       " '山西',\n",
       " '内蒙古',\n",
       " '辽宁',\n",
       " '吉林',\n",
       " '黑龙江',\n",
       " '上海',\n",
       " '江苏',\n",
       " '浙江',\n",
       " '安徽',\n",
       " '福建',\n",
       " '江西',\n",
       " '山东',\n",
       " '河南',\n",
       " '湖北',\n",
       " '湖南',\n",
       " '广东',\n",
       " '广西',\n",
       " '海南',\n",
       " '重庆',\n",
       " '四川',\n",
       " '贵州',\n",
       " '云南',\n",
       " '西藏',\n",
       " '陕西',\n",
       " '甘肃',\n",
       " '青海',\n",
       " '宁夏',\n",
       " '新疆']"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list(area)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "dic = {}\n",
    "score_sum = sum(score)\n",
    "for i in range(len(score)):\n",
    "    dic[area[i]] = (score[i], score[i]/score_sum*100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'北京': (0.45787109585343966, 6.4720891443802095),\n",
       " '天津': (0.24165401156274133, 3.4158223113340442),\n",
       " '河北': (0.23346204680898955, 3.3000274366759736),\n",
       " '山西': (0.13694343277302934, 1.9357197094795082),\n",
       " '内蒙古': (0.16464259675965312, 2.3272523049408695),\n",
       " '辽宁': (0.27184538118948964, 3.8425826755169674),\n",
       " '吉林': (0.2101297635237579, 2.9702214744051254),\n",
       " '黑龙江': (0.2088356638032659, 2.9519291453444096),\n",
       " '上海': (0.38517291710617074, 5.444487494598374),\n",
       " '江苏': (0.7025939331774697, 9.931289852113375),\n",
       " '浙江': (0.4245989000410919, 6.001780755672229),\n",
       " '安徽': (0.19677451619321867, 2.781442684804126),\n",
       " '福建': (0.23293797076082512, 3.292619528789077),\n",
       " '江西': (0.1347714819573391, 1.9050187994992542),\n",
       " '山东': (0.38322967893901644, 5.417019478467891),\n",
       " '河南': (0.254539234732172, 3.597957226057908),\n",
       " '湖北': (0.23632668500311116, 3.340519605600055),\n",
       " '湖南': (0.19204436417549003, 2.714581147130193),\n",
       " '广东': (0.5951596905611978, 8.412687779022372),\n",
       " '广西': (0.14329157935721396, 2.0254518873053535),\n",
       " '海南': (0.07877610853844204, 1.113514265314893),\n",
       " '重庆': (0.14179444916506076, 2.0042896865197855),\n",
       " '四川': (0.22261103204313895, 3.1466464185082526),\n",
       " '贵州': (0.09507138146123637, 1.343850838082719),\n",
       " '云南': (0.11044553624170292, 1.5611672425463208),\n",
       " '西藏': (0.03663171428378797, 0.5177957781201151),\n",
       " '陕西': (0.21276239646413195, 3.0074342079208187),\n",
       " '甘肃': (0.09448443904572751, 1.3355543029439139),\n",
       " '青海': (0.0674998620274637, 0.9541225210139632),\n",
       " '宁夏': (0.08220273834257913, 1.1619502853170471),\n",
       " '新疆': (0.12544405835037997, 1.7731740125748598)}"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dic"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "7.074548660242334"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sum(score)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "dic = {'北京': (0.45787109585343966, 6.4720891443802095),\n",
    "       '天津': (0.24165401156274133, 3.4158223113340442),\n",
    "       '河北': (0.23346204680898955, 3.3000274366759736),\n",
    "       '山西': (0.13694343277302934, 1.9357197094795082),\n",
    "       '内蒙古': (0.16464259675965312, 2.3272523049408695),\n",
    "       '辽宁': (0.27184538118948964, 3.8425826755169674),\n",
    "       '吉林': (0.2101297635237579, 2.9702214744051254),\n",
    "       '黑龙江': (0.2088356638032659, 2.9519291453444096),\n",
    "       '上海': (0.38517291710617074, 5.444487494598374),\n",
    "       '江苏': (0.7025939331774697, 9.931289852113375),\n",
    "       '浙江': (0.4245989000410919, 6.001780755672229),\n",
    "       '安徽': (0.19677451619321867, 2.781442684804126),\n",
    "       '福建': (0.23293797076082512, 3.292619528789077),\n",
    "       '江西': (0.1347714819573391, 1.9050187994992542),\n",
    "       '山东': (0.38322967893901644, 5.417019478467891),\n",
    "       '河南': (0.254539234732172, 3.597957226057908),\n",
    "       '湖北': (0.23632668500311116, 3.340519605600055),\n",
    "       '湖南': (0.19204436417549003, 2.714581147130193),\n",
    "       '广东': (0.5951596905611978, 8.412687779022372),\n",
    "       '广西': (0.14329157935721396, 2.0254518873053535),\n",
    "       '海南': (0.07877610853844204, 1.113514265314893),\n",
    "       '重庆': (0.14179444916506076, 2.0042896865197855),\n",
    "       '四川': (0.22261103204313895, 3.1466464185082526),\n",
    "       '贵州': (0.09507138146123637, 1.343850838082719),\n",
    "       '云南': (0.11044553624170292, 1.5611672425463208),\n",
    "       '西藏': (0.03663171428378797, 0.5177957781201151),\n",
    "       '陕西': (0.21276239646413195, 3.0074342079208187),\n",
    "       '甘肃': (0.09448443904572751, 1.3355543029439139),\n",
    "       '青海': (0.0674998620274637, 0.9541225210139632),\n",
    "       '宁夏': (0.08220273834257913, 1.1619502853170471),\n",
    "       '新疆': (0.12544405835037997, 1.7731740125748598)}\n",
    "\n",
    "data = [\n",
    "    {\"name\": \"广东\", \"value\": [3469.0, 10.12, \"广东\"]},\n",
    "    {\"name\": \"江苏\", \"value\": [2998.0, 8.75, \"江苏\"]},\n",
    "    {\"name\": \"山东\", \"value\": [2770.0, 8.08, \"山东\"]},\n",
    "    {\"name\": \"辽宁\", \"value\": [2011.0, 5.87, \"辽宁\"]},\n",
    "    {\"name\": \"浙江\", \"value\": [1926.0, 5.62, \"浙江\"]},\n",
    "    {\"name\": \"河北\", \"value\": [1691.0, 4.93, \"河北\"]},\n",
    "    {\"name\": \"河南\", \"value\": [1660.0, 4.84, \"河南\"]},\n",
    "    {\"name\": \"上海\", \"value\": [1519.0, 4.43, \"上海\"]},\n",
    "    {\"name\": \"四川\", \"value\": [1486.0, 4.34, \"四川\"]},\n",
    "    {\"name\": \"湖北\", \"value\": [1326.0, 3.87, \"湖北\"]},\n",
    "    {\"name\": \"湖南\", \"value\": [1245.0, 3.63, \"湖南\"]},\n",
    "    {\"name\": \"黑龙江\", \"value\": [1198.0, 3.5, \"黑龙江\"]},\n",
    "    {\"name\": \"福建\", \"value\": [1114.0, 3.25, \"福建\"]},\n",
    "    {\"name\": \"安徽\", \"value\": [1037.0, 3.03, \"安徽\"]},\n",
    "    {\"name\": \"北京\", \"value\": [886.0, 2.59, \"北京\"]},\n",
    "    {\"name\": \"广西\", \"value\": [872.0, 2.54, \"广西\"]},\n",
    "    {\"name\": \"云南\", \"value\": [783.0, 2.28, \"云南\"]},\n",
    "    {\"name\": \"江西\", \"value\": [723.0, 2.11, \"江西\"]},\n",
    "    {\"name\": \"吉林\", \"value\": [719.0, 2.1, \"吉林\"]},\n",
    "    {\"name\": \"山西\", \"value\": [680.0, 1.98, \"山西\"]},\n",
    "    {\"name\": \"陕西\", \"value\": [678.0, 1.98, \"陕西\"]},\n",
    "    {\"name\": \"重庆\", \"value\": [609.0, 1.78, \"重庆\"]},\n",
    "    {\"name\": \"天津\", \"value\": [539.0, 1.57, \"天津\"]},\n",
    "    {\"name\": \"内蒙古\", \"value\": [538.0, 1.57, \"内蒙古\"]},\n",
    "    {\"name\": \"新疆\", \"value\": [495.0, 1.44, \"新疆\"]},\n",
    "    {\"name\": \"贵州\", \"value\": [418.0, 1.22, \"贵州\"]},\n",
    "    {\"name\": \"甘肃\", \"value\": [372.0, 1.09, \"甘肃\"]},\n",
    "    {\"name\": \"海南\", \"value\": [260.0, 0.76, \"海南\"]},\n",
    "    {\"name\": \"青海\", \"value\": [110.0, 0.32, \"青海\"]},\n",
    "    {\"name\": \"宁夏\", \"value\": [104.0, 0.3, \"宁夏\"]},\n",
    "    {\"name\": \"西藏\", \"value\": [37.0, 0.11, \"西藏\"]},\n",
    "]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "for i in data:\n",
    "    area = i[\"name\"]\n",
    "    i[\"value\"][0] = dic[area][0]\n",
    "    i[\"value\"][1] = dic[area][1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'name': '广东', 'value': [0.5951596905611978, 8.412687779022372, '广东']},\n",
       " {'name': '江苏', 'value': [0.7025939331774697, 9.931289852113375, '江苏']},\n",
       " {'name': '山东', 'value': [0.38322967893901644, 5.417019478467891, '山东']},\n",
       " {'name': '辽宁', 'value': [0.27184538118948964, 3.8425826755169674, '辽宁']},\n",
       " {'name': '浙江', 'value': [0.4245989000410919, 6.001780755672229, '浙江']},\n",
       " {'name': '河北', 'value': [0.23346204680898955, 3.3000274366759736, '河北']},\n",
       " {'name': '河南', 'value': [0.254539234732172, 3.597957226057908, '河南']},\n",
       " {'name': '上海', 'value': [0.38517291710617074, 5.444487494598374, '上海']},\n",
       " {'name': '四川', 'value': [0.22261103204313895, 3.1466464185082526, '四川']},\n",
       " {'name': '湖北', 'value': [0.23632668500311116, 3.340519605600055, '湖北']},\n",
       " {'name': '湖南', 'value': [0.19204436417549003, 2.714581147130193, '湖南']},\n",
       " {'name': '黑龙江', 'value': [0.2088356638032659, 2.9519291453444096, '黑龙江']},\n",
       " {'name': '福建', 'value': [0.23293797076082512, 3.292619528789077, '福建']},\n",
       " {'name': '安徽', 'value': [0.19677451619321867, 2.781442684804126, '安徽']},\n",
       " {'name': '北京', 'value': [0.45787109585343966, 6.4720891443802095, '北京']},\n",
       " {'name': '广西', 'value': [0.14329157935721396, 2.0254518873053535, '广西']},\n",
       " {'name': '云南', 'value': [0.11044553624170292, 1.5611672425463208, '云南']},\n",
       " {'name': '江西', 'value': [0.1347714819573391, 1.9050187994992542, '江西']},\n",
       " {'name': '吉林', 'value': [0.2101297635237579, 2.9702214744051254, '吉林']},\n",
       " {'name': '山西', 'value': [0.13694343277302934, 1.9357197094795082, '山西']},\n",
       " {'name': '陕西', 'value': [0.21276239646413195, 3.0074342079208187, '陕西']},\n",
       " {'name': '重庆', 'value': [0.14179444916506076, 2.0042896865197855, '重庆']},\n",
       " {'name': '天津', 'value': [0.24165401156274133, 3.4158223113340442, '天津']},\n",
       " {'name': '内蒙古', 'value': [0.16464259675965312, 2.3272523049408695, '内蒙古']},\n",
       " {'name': '新疆', 'value': [0.12544405835037997, 1.7731740125748598, '新疆']},\n",
       " {'name': '贵州', 'value': [0.09507138146123637, 1.343850838082719, '贵州']},\n",
       " {'name': '甘肃', 'value': [0.09448443904572751, 1.3355543029439139, '甘肃']},\n",
       " {'name': '海南', 'value': [0.07877610853844204, 1.113514265314893, '海南']},\n",
       " {'name': '青海', 'value': [0.0674998620274637, 0.9541225210139632, '青海']},\n",
       " {'name': '宁夏', 'value': [0.08220273834257913, 1.1619502853170471, '宁夏']},\n",
       " {'name': '西藏', 'value': [0.03663171428378797, 0.5177957781201151, '西藏']}]"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
